.TH "display-mansync" 7 "2007-06-23" "libggi-current" GGI
.SH NAME
\fBdisplay-mansync\fR : sync mode emulation
.SH SYNOPIS
.nb
.nf
display-mansync
.fi

.SH DESCRIPTION
Helper library for the implementation of SYNC mode on targets which are
inherently ASYNC (e.g. X) and require manual flushes of the framebuffer.

A target wishing to use mansync should open mansync with MANSYNC_open()
in it's own GGIopen().
It must pass a pointer of a structure containing a pointer to _ggi_opmansync
structure as the 2nd argument to MANSYNC_open(),
and must define the following macros:

.nb
.nf
MANSYNC_init(vis)
MANSYNC_deinit(vis)
MANSYNC_start(vis)
MANSYNC_stop(vis)
MANSYNC_ignore(vis)
MANSYNC_cont(vis)
.fi

which is supposed to call the functions in _ggi_opmansync respectively.

Mansync provides the following functions:

.nb
.nf
int _GGI_mansync_init(vis);
int _GGI_mansync_deinit(vis);
      Initialize/deinitialize mansync for given visual.

int _GGI_mansync_start(vis);
int _GGI_mansync_stop(vis);
      Start/stop mansync handling. (process,thread,etc.)
      You don't need to explicitly call these;
      MANSYNC_SETFLAGS does it for you.

int _GGI_mansync_ignore(vis);
int _GGI_mansync_cont(vis);
      Temporarily start/stop mansync, e.g. during mode set.
      It is o.k. to use them even if mansync has not been started.

MANSYNC_SETFLAGS(vis,flags)
      mansync management in ggiSetFlags().
.fi

(The above functions return 0 if successful, -1 if not.)
.RS
.TP
MANSYNC_open(vis,priv);
loads helper-mansync. On success, priv->mod_mansync != NULL

.TP
MANSYNC_close(priv);
unloads helper-mansync.

.PP
.RE
Please see display/X, display/aa, display/quartz or display/tile
to see how mansync is used.  The functions should be transparent enough.
.RS
\fBImportant:\fR
You're responsible for locking your own visual, not mansync!
.RE
.SH ENVIRONMENT VARIABLES
.TP
\fBGGI_MANSYNC_FPS\fR
This variable specifies the framerate for targets emulating
synchronous mode. The default is 20fps.  If you are experiencing
problems with the X target over relatively slow remote connections
it might be due to connection overload. You might want to try with
a lower \fBGGI_MANSYNC_FPS\fR setting.

.PP
